﻿using System.ComponentModel;
using CommonLibrary.Helpers;
using FileLibrary.Enums;

namespace FileLibrary.Models
{
    [Description("股道")]
    public class Track : FileModel
    {
        private TrackTypeEnum trackTypeEnum;
        private TrackPosEnum trackPosEnum;
        private string type;
        private string typePos;

        [Description("名称")]
        public string Name { get; set; }

        [Description("种类")]
        public string TrackTypeStr
        {
            get { return type; }
            set
            {
                type = value;
                trackTypeEnum = type.Parse<TrackTypeEnum>();
            }
        }

        public TrackTypeEnum TrackTypeEnum => trackTypeEnum;

        [Description("列位")]
        public string TrackPosStr
        {
            get { return typePos; }
            set
            {
                typePos = value;
                trackPosEnum = typePos.Parse<TrackPosEnum>();
            }
        }

        public TrackPosEnum TrackPosEnum => trackPosEnum;
    }
}